﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Presentes.aspx.cs" Inherits="ListaCasamento.adm.Presentes" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
    .imggrid img { width:100px;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h1>Cadastro de Presentes</h1>
        <table>
            <tr><td>Nome:</td><td><asp:TextBox runat="server" ID="txtNome" Width="343px"></asp:TextBox></td></tr>
            <tr><td>Modelo:</td><td><asp:TextBox runat="server" ID="txtModelo" Width="341px"></asp:TextBox></td></tr>
            <tr><td colspan="2">Onde encontrar:</td></tr>
            <tr><td colspan="2">Loja: <asp:TextBox runat="server" ID="txtLoja" Width="234px"></asp:TextBox> Link Produto: 
                <asp:TextBox runat="server" ID="txtLink" Width="239px"></asp:TextBox>
            <asp:Button runat="server" ID="btnAdicionarLink" Text="Adicionar Link" 
                    onclick="btnAdicionarLink_Click" />
            </td></tr>
            <tr><td colspan="2">Links adicionados:<asp:GridView ID="gvLinks" runat="server" 
                    AutoGenerateColumns="False" CellPadding="4" 
                    ForeColor="#333333" GridLines="None"
                    onrowdeleting="gvLinks_RowDeleting" 
                    EmptyDataText="Nenhum link de loja adicionado" Width="614px">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="Loja" HeaderText="Loja" >
                    <ItemStyle Font-Names="Arial" Font-Size="12px" HorizontalAlign="Center" 
                        VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Link" HeaderText="Link Produto" >
                    <ItemStyle Font-Names="Arial" Font-Size="12px" HorizontalAlign="Center" 
                        VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:CommandField ButtonType="Button" DeleteText="Excluir" 
                        ShowDeleteButton="True" />
                </Columns>
                <EditRowStyle BackColor="#7C6F57" />
                <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#E3EAEB" />
                <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                </asp:GridView>
                <br />
            </td></tr>
            <tr><td>Foto:</td><td><asp:FileUpload runat="server" ID="fuFoto" /></td></tr>
            <tr><td colspan="2">
                <br />
                <asp:Button runat="server" ID="btnSalvar" 
                    Text="Salvar Presente" onclick="btnSalvar_Click" /></td></tr>
        </table>
        <br /><br /><br />
        <h1>Presentes cadastrados:</h1>
        <asp:GridView runat="server" ID="gvPresentes" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="#333333" 
            GridLines="None" DataKeyNames="Idf_Presente" 
            onrowdeleting="gvPresentes_RowDeleting" OnRowEditing="gvPresentes_RowEditing" Width="462px">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField HeaderText="Presente" DataField="Nme_Presente" >
                <ItemStyle Font-Names="Arial" Font-Size="12px" HorizontalAlign="Center" 
                    VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:BoundField DataField="Nme_Ofertante" HeaderText="Ofertante" >
                <ItemStyle Font-Names="Arial" Font-Size="12px" HorizontalAlign="Center" 
                    VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:ImageField DataImageUrlField="Idf_Presente" 
                    DataImageUrlFormatString="/images/presentes/{0}.jpg">
                    <ItemStyle CssClass="imggrid" Width="100px" />
                </asp:ImageField>
                <asp:CommandField DeleteText="Excluir" ShowDeleteButton="True" ShowEditButton="true" EditText="Retirar Reserva">
                <ItemStyle Font-Names="Arial" Font-Size="12px" HorizontalAlign="Center" 
                    VerticalAlign="Middle" />
                </asp:CommandField>
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        </asp:GridView>
    </div>
    </form>
</body>
</html>
